package org.ddd.orderdemo.application.event.center;

import com.google.common.eventbus.SubscriberExceptionContext;
import com.google.common.eventbus.SubscriberExceptionHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class EventBusExceptionHandler implements SubscriberExceptionHandler {

    private Logger logger = LoggerFactory.getLogger(EventBusExceptionHandler.class);

    @Override
    public void handleException(Throwable exception, SubscriberExceptionContext context) {
        logger.error("Event handling failed", exception);
    }
}
